package cn.sunxyz.behavior.strategy;

/**
 * Created by yangrd on 2017/5/15.
 */
public class Context {

    private Strategy strategy;

    public Context(Strategy strategy) {
        this.strategy = strategy;
    }

    public Context setStrategy(Strategy strategy) {
        this.strategy = strategy;
        return this;
    }

    public void algorithm(){
        strategy.algorithm();
    }
}
